package cn.rkylin.oms.warehouse.local.returnStockin.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;

import cn.rkylin.oms.warehouse.local.returnStockin.vo.ReturnStockinSkuVO;
import cn.rkylin.oms.warehouse.local.returnStockin.vo.ReturnStockinVO;

/**
 * 退货入库单Service
 * 
 * @author 齐涛
 * @version 1.0
 * @created 28-9-2017 10:51:30
 */
public interface IReturnStockinService {

    /**
     * 查询退货入库单列表
     * 
     * @param page
     *            页号
     * @param rows
     *            页大小
     * @param returnStockinVO
     *            退货入库单VO
     * @return 退货入库单列表
     * @throws Exception
     *             异常
     */
    @SuppressWarnings("rawtypes")
    public PageInfo findByWhere(int page, int rows, ReturnStockinVO returnStockinVO) throws Exception;

    /**
     * 查询退货入库单信息
     *
     * @param returnStockinVO
     *            退货入库单VO
     * @return 退货入库单信息
     * @throws Exception
     *             异常
     */
    public ReturnStockinVO getReturnStockinInfo(ReturnStockinVO returnStockinVO) throws Exception;

    /**
     * 查询退货入库单商品列表
     *
     * @param returnStockinSkuVO
     *            退货入库单商品VO
     * @return 退货入库单信息
     * @throws Exception
     *             异常
     */
    public List<ReturnStockinSkuVO> selectReturnStockinSkuList(ReturnStockinSkuVO returnStockinSkuVO) throws Exception;

    /**
     * 修改退货入库单
     * 
     * @param returnStockinVO
     *            退货入库单VO
     * @return 更新条数
     * @throws Exception
     *             异常
     */
    public int updateReturnStockin(ReturnStockinVO returnStockinVO) throws Exception;

    /**
     * 取消退货入库单
     *
     * @param stockinId
     *            退货入库单Id
     * @throws Exception
     *             异常
     * @return 取消结果信息
     */
    public Map<String, String> cancelReturnStockin(String stockinId) throws Exception;
    
    
    /**
     * 完成入库单
     *
     * @param stockInVO 入库单VO
     * @return 完成入库单条数
     * @throws Exception 异常
     */
    public int updateFinishStockIn(ReturnStockinVO returnStockinVO) throws Exception;

    /**
     * getUnGoingCount:根据查询条件获取进行中的单据数量. <br/>
     *
     * @author zhanghao
     * @param paramMap
     * @return
     * @throws Exception 
     */
    public int getUnGoingCount(Map<String, String> paramMap) throws Exception;

//    /**
//     * 通过来源ID获取退货入库单信息 wangxing add
//     * @param strSourceId
//     * @return
//     * @throws Exception
//     */
//    public ReturnStockinVO getReturnStockInInfoBySourceId(String strSourceId) throws Exception;

}
